<template>
	<!-- 路由参数 -->
	<view class="flex jcsb aic ComponyRouter">
		<view class="ComponyRouter_left flex aic">
			<image v-if="!personData.companyLogoUrl" src="../../static/touxiang.png" mode=""></image>
			<image v-if="personData.companyLogoUrl" :src="personData.companyLogoUrl" mode=""></image>
			<view class="ComponyRouter_left_p flex flex_column jcsb aifs">
				<text class="fontw700 fonts16">{{personData.companyName}}</text>
				<text class="fontz fonts12 gray">{{dictFun(personData.companyType, "company_type")}} <text v-if="personData.companySize">|</text> {{dictFun(personData.companySize, "company_size")}} <text v-if="personData.companyIndustry">|</text> {{ dictFun(personData.companyIndustry, "company_industry")}}</text>
			</view>
		</view>
		<image src="../../static/icon／arrow-right.png" mode=""></image>
	</view>
</template>

<script>
	import {
		dictFuns
	} from "@/util/dictionary"
	export default {
		props: ["data"],
		name:"ComponyRouter",
		
		data() {
			return {
				personData: {
					companyLogoUrl:""
				}
			}
		},
		watch: {
			//  如果需要第一次就执行监听 则需要设置：immediate: true
			data: {
				handler(newVal, oldVal) {
					this.personData = this.data?this.data:{}
					this.personData.companyLogoUrl=this.data?this.data.companyLogoUrl?this.data.companyLogoUrl:"":""
				},
				deep: true
			},
		},
		created() {
			
		},
		methods: {
			dictFun(value, res) {
				return dictFuns(value, res)
			},
			string_arrFun(res) {
				console.log(res);
		
				let arrs = res ? res.split(",") : []
				return arrs
			}
		
		}
	}
</script>

<style lang="scss" scoped>
	.ComponyRouter{
		padding: 14px;
		background: #FFFFFF;
		.ComponyRouter_left{
			image{
				width: 41px;
				height: 41px;
				border-radius: 50%;
				margin-right: 10px;
			}
		}
		image{
			width: 20px;
			height: 20px;
		}
	}
</style>